import request from '@/utils/request'

// 查询资金用途说明列表
export function listUsefunds(query) {
  return request({
    url: '/publish/usefunds/usefunds/list',
    method: 'get',
    params: query
  })
}

// 查询发行人对应资金用途说明列表
export function listMyUsefunds(query) {
  return request({
    url: '/publish/usefunds/usefunds/listMyUsefunds',
    method: 'get',
    params: query
  })
}

// 查询资金用途说明详细
export function getUsefunds(id) {
  return request({
    url: '/publish/usefunds/usefunds/' + id,
    method: 'get'
  })
}

// 新增资金用途说明
export function addUsefunds(data) {
  return request({
    url: '/publish/usefunds/usefunds',
    method: 'post',
    data: data
  })
}

// 修改资金用途说明
export function updateUsefunds(data) {
  return request({
    url: '/publish/usefunds/usefunds',
    method: 'put',
    data: data
  })
}

// 删除资金用途说明
export function delUsefunds(id) {
  return request({
    url: '/publish/usefunds/usefunds/' + id,
    method: 'delete'
  })
}

// 导出资金用途说明
export function exportUsefunds(query) {
  return request({
    url: '/publish/usefunds/usefunds/export',
    method: 'get',
    params: query
  })
}
